# 基于django-filter插件，完成指定区间筛选（一般都是对应数字字段）
from django_filters.rest_framework.filterset import FilterSet
from django_filters import filters
from . import models
class QuestionFilterSet(FilterSet):

    class Meta:
        model = models.Question
        fields = ['user_id']

class ComplainFilterSet(FilterSet):
    class Meta:
        model = models.Complain
        fields = ['user_id']

class TrafficFilterSet(FilterSet):
    class Meta:
        model = models.Traffic
        fields = ['user_id']

class ReceiptFilterSet(FilterSet):
    class Meta:
        model = models.Receipt
        fields = ['user']